﻿/**********************************************************************
 * @file   GUICreateSEACavitySelectPicklDialog.h
 * @brief  创建SEA声腔子系统拾取数据窗口声明
 * @author liuzhonghua (liuzhonghuaszch@163.com)
 * @date   2025-02-27
 *********************************************************************/
#ifndef _GUICreateSEACavitySelectPicklDialog_H
#define _GUICreateSEACavitySelectPicklDialog_H

#include "GUISubSystemDialogAPI.h"
#include "GUIWidget/GUIDialogBase.h"
#include "FITK_Kernel/FITKCore/FITKActionOperator.h"

namespace Ui
{
    class GUICreateSEACavitySelectPicklDialog;
}

namespace Core
{
    class FITKActionOperator;
}

namespace Acoustics
{
    class FITKSEASubSysCavity;
}

namespace GUI
{
    /**
     * @brief  Create SEA Cavity SelectPickl Dialog
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date   2024-10-23
     */
    class GUISubSystemDialogAPI GUICreateSEACavitySelectPicklDialog :public GUIDialogBase
    {
        Q_OBJECT;
    public:
        /**
         * @brief     create object
         * @param[i]  obj            My Param doc
         * @param[i]  oper           operator
         * @param[i]  parent
         * @author    liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        GUICreateSEACavitySelectPicklDialog(Core::FITKActionOperator* oper, QWidget* parent = nullptr);
        /**
         * @brief  Destroy object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-10-23
         */
        virtual ~GUICreateSEACavitySelectPicklDialog();
        /**
         * @brief    获取声腔数据
         * @return   Acoustics::FITKSEASubSysCavity *
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-03-03
         */
        Acoustics::FITKSEASubSysCavity * getCavityData();

    protected slots:
        /**
         * @brief  radioButton Shell clicked slot
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2025-02-27
         */
        void on_radioButton_Shell_clicked(bool checked);
        /**
         * @brief  radioButton Geometry clicked slot
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2025-02-27
         */
        void on_radioButton_Geometry_clicked(bool checked);
        /**
         * @brief  radioButton Node clicked slot
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2025-02-27
         */
        void on_radioButton_Mesh_clicked(bool checked);
        /**
         * @brief cencel button clicked slot
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        void on_pushButton_Cancel_clicked();
        /**
         * @brief ok button clicked slot
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        void on_pushButton_OK_clicked();
        /**
         * @brief    创建声腔通过几何实体
         * @return   bool
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-03-03
         */
        bool createCavityByGeometry();
        /**
         * @brief    创建声腔通过板
         * @return   bool
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-03-03
         */
        bool createCavityByShell();
        /**
         * @brief    创建板通过声腔里的面数据
         * @return   bool
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-03-03
         */
        bool createSubShellByCavity();
        /**
         * @brief    关闭槽
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        virtual void reject() override;

    protected:
        /**
         * @brief    初始化
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-12
         */
        void init();
        /**
         * @brief    拾取完成处理
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-01
         */
        void pickFinished();
        /**
         * @brief    每次拾取完成处理
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-03-03
         */
        void pickDataFinished();

    protected:
        /**
         * @brief ui object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        Ui::GUICreateSEACavitySelectPicklDialog* _ui = nullptr;
        /**
         * @brief 操作器对象
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        Core::FITKActionOperator* _oper = nullptr;
        /**
         * @brief  子系统类型
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-11-12
         */
        int _subSysType{ 0 };
        /**
         * @brief  声腔数据
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2025-03-03
         */
        Acoustics::FITKSEASubSysCavity * _cavityData{};
    };
}

#endif
